#include "StartupPage.h"
#include "AppRouter.h"
#include "PageMgr.h"

REGISTER_PAGE("Pages/Startup", StartupPage)

void StartupPage::OnViewLoad() {
	m_view.Create(m_body);
	//AddEvent(m_body);
}

void StartupPage::OnViewShow() {
	m_view.StartElemAnim();
	SetTimer(1500);
}

bool StartupPage::OnTimer() {
	GoTo("Pages/Main", anim_type_em::LOAD_ANIM_FADE_ON);
	return false;
}
void StartupPage::OnEvent(lv_event_code_t code, lv_obj_t* obj)
{
	if (code == LV_EVENT_CLICKED) {
		GoTo("Pages/Main");
	}
}